<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="../commons/meta.jsp"%>
<title>${commonTitle}-编辑接口</title>
</head>
<body class="fixed-sidebar full-height-layout">
<div id="wrapper">
    <%@ include file="../commons/left.jsp"%>
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <%@ include file="../commons/top.jsp"%>
        <!-- 业务代码 -->
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-10">
                <h2>编辑接口</h2>
                <ol class="breadcrumb">
                    <li><a href="${ctx}/send/service/list">接口管理</a></li>
                    <li><strong>编辑接口</strong></li>
                </ol>
            </div>
            <div class="col-lg-2"></div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">

                        <div class="ibox-title">
                            <h5>编辑接口</h5>
                            <div class="ibox-tools">
                                <a href="${ctx}/send/service/list" class="btn btn-primary btn-xs">返回列表</a>
                            </div>
                        </div>
                        <div class="ibox-content">

                            <form class="form-horizontal m-t" id="editForm" method="post" action="#">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">接口方法：</label>
                                    <div class="col-sm-4">
                                        <input name="method" class="form-control" value="${openService.method}" id="method" readonly="true">
                                    </div>
                                    <span class="spanRed">*</span>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">功能描述：</label>
                                    <div class="col-sm-4">
                                        <textarea class="form-control" name="memo" id="methodMemo" placeholder="请输入接口描述">${openService.memo}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">系统名称：</label>
                                    <div class="col-sm-4">
                                        <input name="name" class="form-control" value="${openService.name}" id="methodName"/>
                                    </div>
                                    <span class="spanRed">*</span>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">负责人：</label>
                                    <div class="col-sm-4">
                                        <input name="author" class="form-control" value="${openService.author}" id="methodAuthor"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">接口地址：</label>
                                    <div class="col-sm-4">
                                        <input name="url" class="form-control" value="${openService.url}" id="methodUrl"/>
                                    </div>
                                    <span class="spanRed">*</span>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">参数模板：</label>
                                    <div class="col-sm-4">
                                        <textarea class="form-control"  name="paramTemplate" id="paramTemplate">${openService.paramTemplate}</textarea>
                                    </div>
                                    <span class="spanRed">*</span>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">contentType：</label>
                                    <div class="col-sm-4">
                                        <select name="contentType" class="form-control">
                                                <option <c:if test='${openService.contentType eq "application/json"}'>selected</c:if> value="application/json">application/json</option>
                                                <option <c:if test='${openService.contentType eq "application/x-www-form-urlencoded"}'>selected</c:if> value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">请求类型：</label>
                                    <div class="col-sm-4">
                                        <select name="requestMethod" class="form-control" >
                                            <option <c:if test='${openService.requestMethod eq "POST"}'>selected</c:if> value="POST">POST</option>
                                            <option <c:if test='${openService.requestMethod eq "GET"}'>selected</c:if> value="GET">GET</option>
                                        </select>

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">是否启用：</label>
                                    <div class="col-sm-4">
                                        <div class="radio col-md-2">
                                            <label> <input type="radio" value="Y" name="state" <c:if test="${openService.state eq 'Y'}">checked="checked"</c:if> >是
                                            </label>
                                        </div>
                                        <div class="radio col-md-2">
                                            <label> <input type="radio" value="N" name="state" <c:if test="${openService.state eq 'N'}">checked="checked"</c:if>>否
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">创建时间：</label>
                                    <div class="col-sm-4">
                                        <input type="text" name="createTime" class="form-control" value="<fmt:formatDate value="${openService.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" disabled="disabled"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-3">
                                        <button class="btn btn-primary" type="submit">修改</button>
                                    </div>
                                </div>
                            </form>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <%@ include file="../commons/footer.jsp"%>
    </div>
</div>
<!-- jQuery Validation plugin javascript-->
<%@ include file="../commons/validate.jsp"%>
<script src="${ctx}/hplus/js/gateway/service/edit.validate.js"></script>

</body>
</html>